package org.igeek.proxy.statics;

/**
 * @package org.igeek.proxy.statics
 * @Description 静态代理的代理类
 * @Author LittlePunk [296526219@qq.ccom]
 * @Version 2022.1
 * @Date 2023/11/13 21:15
 */
public class StaticProxy implements OrderInterface{
    //1.创建目标对象
    private OrderInterface orderInterface;

    public StaticProxy() {
    }

    public StaticProxy(OrderInterface orderInterface) {
        this.orderInterface = orderInterface;
    }

    //增强业务功能
    @Override
    public String order(String foodName) {
        String result = orderInterface.order(foodName);
        System.out.println("已经在接订单的路上了");
        return result+"买了一杯珍珠奶茶";
    }



}
